<!DOCTYPE html>
<html lang="en">
  <head>
    <title>RendererView Class Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
    <script src="../js/lunr.min.js" defer></script>
    <script src="../js/typeahead.jquery.js" defer></script>
    <script src="../js/jazzy.search.js" defer></script>
  </head>
  <body>
    <a name="//apple_ref/swift/Class/RendererView" class="dashAnchor"></a>
    <a title="RendererView Class Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="../index.html">Proton Docs</a> (78% documented)</p>
        <p class="header-right"><a href="https://github.com/rajdeep/proton"><img src="../img/gh.png" alt="GitHub"/>View on GitHub</a></p>
        <div class="header-right">
          <form role="search" action="../search.json">
            <input type="text" placeholder="Search documentation" data-typeahead>
          </form>
        </div>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="../index.html">Proton Reference</a>
        <img id="carat" src="../img/carat.png" alt=""/>
        RendererView Class Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Classes/Attachment.html">Attachment</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/AttributesToggleCommand.html">AttributesToggleCommand</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/BackgroundStyle.html">BackgroundStyle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/BoldCommand.html">BoldCommand</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/BorderStyle.html">BorderStyle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/EditorCommandExecutor.html">EditorCommandExecutor</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/EditorView.html">EditorView</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/EditorViewContext.html">EditorViewContext</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/FontTraitToggleCommand.html">FontTraitToggleCommand</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/HighlightTextCommand.html">HighlightTextCommand</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/ItalicsCommand.html">ItalicsCommand</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/ListCommand.html">ListCommand</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/ListTextProcessor.html">ListTextProcessor</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/RendererCommandExecutor.html">RendererCommandExecutor</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/RendererView.html">RendererView</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/RendererViewContext.html">RendererViewContext</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/ShadowStyle.html">ShadowStyle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/StrikethroughCommand.html">StrikethroughCommand</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/UnderlineCommand.html">UnderlineCommand</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Enums.html">Enumerations</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Enums/AttachmentSize.html">AttachmentSize</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/AttachmentType.html">AttachmentType</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/BackgroundMode.html">BackgroundMode</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/EditorContentMode.html">EditorContentMode</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/EditorContentType.html">EditorContentType</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/EditorHeight.html">EditorHeight</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/EditorKey.html">EditorKey</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/ListLineMarker.html">ListLineMarker</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/RoundedCornerStyle.html">RoundedCornerStyle</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Extensions/NSAttributedString.html">NSAttributedString</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/NSAttributedString/Key.html">– Key</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/NSParagraphStyle.html">NSParagraphStyle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/NSRange.html">NSRange</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/String.html">String</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/TextProcessingPriority.html">TextProcessingPriority</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIFont.html">UIFont</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UITextRange.html">UITextRange</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Protocols/AttachmentEncoding.html">AttachmentEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/AttachmentOffsetProviding.html">AttachmentOffsetProviding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/AttributesDecoding.html">AttributesDecoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols.html#/s:6Proton12BlockContentP">BlockContent</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/BoundsObserving.html">BoundsObserving</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/DynamicBoundsProviding.html">DynamicBoundsProviding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/EditorCommand.html">EditorCommand</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/EditorContentDecoding.html">EditorContentDecoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/EditorContentEncoder.html">EditorContentEncoder</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/EditorContentEncoding.html">EditorContentEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/EditorContentIdentifying.html">EditorContentIdentifying</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/EditorContentView.html">EditorContentView</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/EditorListFormattingProvider.html">EditorListFormattingProvider</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/EditorTextEncoding.html">EditorTextEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/EditorViewDelegate.html">EditorViewDelegate</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/Focusable.html">Focusable</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols.html#/s:6Proton13InlineContentP">InlineContent</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/RendererCommand.html">RendererCommand</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/RendererListFormattingProvider.html">RendererListFormattingProvider</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/RendererViewDelegate.html">RendererViewDelegate</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/SequenceGenerator.html">SequenceGenerator</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/TextProcessing.html">TextProcessing</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Structs.html">Structures</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Structs/AnyAttributeDecoding.html">AnyAttributeDecoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/AnyEditorContentAttachmentEncoding.html">AnyEditorContentAttachmentEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/AnyEditorContentDecoding.html">AnyEditorContentDecoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/AnyEditorTextEncoding.html">AnyEditorTextEncoding</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/BlockAttachmentImage.html">BlockAttachmentImage</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/CommandName.html">CommandName</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/DiamondBulletSequenceGenerator.html">DiamondBulletSequenceGenerator</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/EditorContent.html">EditorContent</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/EditorLine.html">EditorLine</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/InlineAttachmentImage.html">InlineAttachmentImage</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/LineFormatting.html">LineFormatting</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/ListItem.html">ListItem</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/ListParser.html">ListParser</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/NumericSequenceGenerator.html">NumericSequenceGenerator</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/SquareBulletSequenceGenerator.html">SquareBulletSequenceGenerator</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Typealiases.html">Type Aliases</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:6Proton10Attributesa">Attributes</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:6Proton9Processeda">Processed</a>
              </li>
              <li class="nav-group-task">
                <a href="../Typealiases.html#/s:6Proton22TextProcessingPrioritya">TextProcessingPriority</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>RendererView</h1>
              <div class="declaration">
                <div class="language">
                  
                  <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">class</span> <span class="kt">RendererView</span> <span class="p">:</span> <span class="kt">UIView</span></code></pre>

                </div>
              </div>
            <p>A scrollable, multiline text region capable of resizing itself based of the height of the content. Maximum height of <code>RendererView</code>
may be restricted using an absolute value or by using auto-layout constraints. Instantiation of <code>RendererView</code> is simple and straightforward
and can be used to host simple formatted text or complex layout containing multiple nested <code>RendererView</code> via use of <code><a href="../Classes/Attachment.html">Attachment</a></code>.</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton12RendererViewC8delegateAA0bC8Delegate_pSgvp"></a>
                    <a name="//apple_ref/swift/Property/delegate" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton12RendererViewC8delegateAA0bC8Delegate_pSgvp">delegate</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>An object interested in intercepting and responding to user interaction like tap and selecting changes in the <code>RendererView</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">delegate</span><span class="p">:</span> <span class="kt"><a href="../Protocols/RendererViewDelegate.html">RendererViewDelegate</a></span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton12RendererViewC22listFormattingProviderAA0b4ListeF0_pSgvp"></a>
                    <a name="//apple_ref/swift/Property/listFormattingProvider" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton12RendererViewC22listFormattingProviderAA0b4ListeF0_pSgvp">listFormattingProvider</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">weak</span> <span class="k">var</span> <span class="nv">listFormattingProvider</span><span class="p">:</span> <span class="kt"><a href="../Protocols/RendererListFormattingProvider.html">RendererListFormattingProvider</a></span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton12RendererViewC7contextAA0bC7ContextCvp"></a>
                    <a name="//apple_ref/swift/Property/context" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton12RendererViewC7contextAA0bC7ContextCvp">context</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Context for the current renderer</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">context</span><span class="p">:</span> <span class="kt"><a href="../Classes/RendererViewContext.html">RendererViewContext</a></span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton12RendererViewC5frame7contextACSo6CGRectV_AA0bC7ContextCtcfc"></a>
                    <a name="//apple_ref/swift/Method/init(frame:context:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton12RendererViewC5frame7contextACSo6CGRectV_AA0bC7ContextCtcfc">init(frame:<wbr>context:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Initializes the RendererView</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">frame</span><span class="p">:</span> <span class="kt">CGRect</span> <span class="o">=</span> <span class="o">.</span><span class="n">zero</span><span class="p">,</span> <span class="nv">context</span><span class="p">:</span> <span class="kt"><a href="../Classes/RendererViewContext.html">RendererViewContext</a></span> <span class="o">=</span> <span class="o">.</span><span class="n">shared</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>frame</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Initial frame to be used for <code>RendererView</code></p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>context</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Optional context to be used. <code><a href="../Classes/RendererViewContext.html">RendererViewContext</a></code> is link between <code><a href="../Classes/RendererCommandExecutor.html">RendererCommandExecutor</a></code> and the <code>RendererView</code>.
<code><a href="../Classes/RendererCommandExecutor.html">RendererCommandExecutor</a></code> needs to have same context as the <code>RendererView</code> to execute a command on it. Unless you need to have
restriction around some commands to be restricted in execution on certain specific renderers, the default value may be used.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton12RendererViewC4fontSo6UIFontCvp"></a>
                    <a name="//apple_ref/swift/Property/font" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton12RendererViewC4fontSo6UIFontCvp">font</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Default font to be used for the rendered content.</p>
<div class="aside aside-note">
    <p class="aside-title">Note</p>
    This font is only applied in case where the <code><a href="../Classes/RendererView.html#/s:6Proton12RendererViewC14attributedTextSo18NSAttributedStringCvp">attributedText</a></code> does not have
font information in the content. If the <code><a href="../Classes/RendererView.html#/s:6Proton12RendererViewC14attributedTextSo18NSAttributedStringCvp">attributedText</a></code> already has an attribute applied
for font, this font will be ignored.

</div>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">font</span><span class="p">:</span> <span class="kt">UIFont</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton12RendererViewC14attributedTextSo18NSAttributedStringCvp"></a>
                    <a name="//apple_ref/swift/Property/attributedText" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton12RendererViewC14attributedTextSo18NSAttributedStringCvp">attributedText</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Content rendered in the <code>RendererView</code>.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">attributedText</span><span class="p">:</span> <span class="kt">NSAttributedString</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton12RendererViewC13selectedRangeSo8_NSRangeVvp"></a>
                    <a name="//apple_ref/swift/Property/selectedRange" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton12RendererViewC13selectedRangeSo8_NSRangeVvp">selectedRange</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Gets or sets the selected range.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">selectedRange</span><span class="p">:</span> <span class="kt">NSRange</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton12RendererViewC17dataDetectorTypesSo06UIDataeF0Vvp"></a>
                    <a name="//apple_ref/swift/Property/dataDetectorTypes" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton12RendererViewC17dataDetectorTypesSo06UIDataeF0Vvp">dataDetectorTypes</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The types of data converted to tappable URLs in the renderer view.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">dataDetectorTypes</span><span class="p">:</span> <span class="kt">UIDataDetectorTypes</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton12RendererViewC18linkTextAttributesSDySo21NSAttributedStringKeyaypGSgvp"></a>
                    <a name="//apple_ref/swift/Property/linkTextAttributes" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton12RendererViewC18linkTextAttributesSDySo21NSAttributedStringKeyaypGSgvp">linkTextAttributes</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>The attributes to apply to links.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">linkTextAttributes</span><span class="p">:</span> <span class="p">[</span><span class="kt">NSAttributedString</span><span class="o">.</span><span class="kt">Key</span> <span class="p">:</span> <span class="kt">Any</span><span class="p">]</span><span class="o">!</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton12RendererViewC12selectedTextSo18NSAttributedStringCvp"></a>
                    <a name="//apple_ref/swift/Property/selectedText" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton12RendererViewC12selectedTextSo18NSAttributedStringCvp">selectedText</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Selected text in the editor.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">selectedText</span><span class="p">:</span> <span class="kt">NSAttributedString</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton12RendererViewC12visibleRangeSo8_NSRangeVvp"></a>
                    <a name="//apple_ref/swift/Property/visibleRange" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton12RendererViewC12visibleRangeSo8_NSRangeVvp">visibleRange</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Returns the visible text range.</p>
<div class="aside aside-note">
    <p class="aside-title">Note</p>
    The range may also contains lines that are partially visible owing to the current scroll position.

</div>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">visibleRange</span><span class="p">:</span> <span class="kt">NSRange</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton12RendererViewC8contentsSayAA13EditorContentVGvp"></a>
                    <a name="//apple_ref/swift/Property/contents" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton12RendererViewC8contentsSayAA13EditorContentVGvp">contents</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Get all the content from <code>Renderer</code>.</p>
<div class="aside aside-see-also">
    <p class="aside-title">See also</p>
    If you need to get content in a given range, please use <code>contents(in range:NSRange)</code>.

</div>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">contents</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Structs/EditorContent.html">EditorContent</a></span><span class="p">]</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton12RendererViewC13contentOffsetSo7CGPointVvp"></a>
                    <a name="//apple_ref/swift/Property/contentOffset" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton12RendererViewC13contentOffsetSo7CGPointVvp">contentOffset</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Gets and sets the content offset.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">contentOffset</span><span class="p">:</span> <span class="kt">CGPoint</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton12RendererViewC20scrollRangeToVisibleyySo8_NSRangeVF"></a>
                    <a name="//apple_ref/swift/Method/scrollRangeToVisible(_:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton12RendererViewC20scrollRangeToVisibleyySo8_NSRangeVF">scrollRangeToVisible(_:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Scrolls the given range to visible area of the <code>RendererView</code>. The scroll only changes enough to
make the range visible i.e. the it does not scroll far enough such that given range is centred
in the visible area of <code>Renderer</code>.
No-op if the range is already visible.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">scrollRangeToVisible</span><span class="p">(</span><span class="n">_</span> <span class="nv">range</span><span class="p">:</span> <span class="kt">NSRange</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>range</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Range to scroll to.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton12RendererViewC19scrollRectToVisible_8animatedySo6CGRectV_SbtF"></a>
                    <a name="//apple_ref/swift/Method/scrollRectToVisible(_:animated:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton12RendererViewC19scrollRectToVisible_8animatedySo6CGRectV_SbtF">scrollRectToVisible(_:<wbr>animated:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Scrolls the given rectangle to visible area of <code>RendererView</code></p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">scrollRectToVisible</span><span class="p">(</span><span class="n">_</span> <span class="nv">rect</span><span class="p">:</span> <span class="kt">CGRect</span><span class="p">,</span> <span class="nv">animated</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>rect</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Rectangle to scroll to.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>animated</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Determines if the scroll action should animate</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton12RendererViewC8contents2inSayAA13EditorContentVGSo8_NSRangeVSg_tF"></a>
                    <a name="//apple_ref/swift/Method/contents(in:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton12RendererViewC8contents2inSayAA13EditorContentVGSo8_NSRangeVSg_tF">contents(in:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Gets the contents in the given range</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">contents</span><span class="p">(</span><span class="k">in</span> <span class="nv">range</span><span class="p">:</span> <span class="kt">NSRange</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="p">[</span><span class="kt"><a href="../Structs/EditorContent.html">EditorContent</a></span><span class="p">]</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>range</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Range to get contents from.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton12RendererViewC5rects3forSaySo6CGRectVGSo8_NSRangeV_tF"></a>
                    <a name="//apple_ref/swift/Method/rects(for:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton12RendererViewC5rects3forSaySo6CGRectVGSo8_NSRangeV_tF">rects(for:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Gets the bounding rectangles for the given range. If the range spans across multiple lines,
in the <code>RendererView</code>, a rectangle is returned for each of the line.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">rects</span><span class="p">(</span><span class="k">for</span> <span class="nv">range</span><span class="p">:</span> <span class="kt">NSRange</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="p">[</span><span class="kt">CGRect</span><span class="p">]</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>range</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Range to get bounding rectangles for.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton12RendererViewC13addAttributes_2atySDySo21NSAttributedStringKeyaypG_So8_NSRangeVtF"></a>
                    <a name="//apple_ref/swift/Method/addAttributes(_:at:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton12RendererViewC13addAttributes_2atySDySo21NSAttributedStringKeyaypG_So8_NSRangeVtF">addAttributes(_:<wbr>at:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Adds given attributes to the range provided. If the range already contains a value for an attribute being provided,
existing value will be overwritten by the new value provided in the attributes.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">addAttributes</span><span class="p">(</span><span class="n">_</span> <span class="nv">attributes</span><span class="p">:</span> <span class="p">[</span><span class="kt">NSAttributedString</span><span class="o">.</span><span class="kt">Key</span> <span class="p">:</span> <span class="kt">Any</span><span class="p">],</span> <span class="n">at</span> <span class="nv">range</span><span class="p">:</span> <span class="kt">NSRange</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>attributes</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Attributes to be added.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>range</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Range on which attributes should be applied to.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton12RendererViewC16removeAttributes_2atySaySo21NSAttributedStringKeyaG_So8_NSRangeVtF"></a>
                    <a name="//apple_ref/swift/Method/removeAttributes(_:at:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton12RendererViewC16removeAttributes_2atySaySo21NSAttributedStringKeyaG_So8_NSRangeVtF">removeAttributes(_:<wbr>at:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Removes the given attributes from the range provided. If the attribute does not exist in the range, it will be a no-op.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">removeAttributes</span><span class="p">(</span><span class="n">_</span> <span class="nv">attributes</span><span class="p">:</span> <span class="p">[</span><span class="kt">NSAttributedString</span><span class="o">.</span><span class="kt">Key</span><span class="p">],</span> <span class="n">at</span> <span class="nv">range</span><span class="p">:</span> <span class="kt">NSRange</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>attributes</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Attributes to remove.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>range</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Range to remove the attributes from.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton12RendererViewC12addAttribute_5value2atySo21NSAttributedStringKeya_ypSo8_NSRangeVtF"></a>
                    <a name="//apple_ref/swift/Method/addAttribute(_:value:at:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton12RendererViewC12addAttribute_5value2atySo21NSAttributedStringKeya_ypSo8_NSRangeVtF">addAttribute(_:<wbr>value:<wbr>at:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Adds given attribute to the range provided. If the attribute already exists in the range, it will be overwritten with the new value provided here.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">addAttribute</span><span class="p">(</span><span class="n">_</span> <span class="nv">name</span><span class="p">:</span> <span class="kt">NSAttributedString</span><span class="o">.</span><span class="kt">Key</span><span class="p">,</span> <span class="nv">value</span><span class="p">:</span> <span class="kt">Any</span><span class="p">,</span> <span class="n">at</span> <span class="nv">range</span><span class="p">:</span> <span class="kt">NSRange</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>name</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Key of the attribute to add.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>value</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Value of the attribute.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>range</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Range to which attribute should be added.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:6Proton12RendererViewC15removeAttribute_2atySo21NSAttributedStringKeya_So8_NSRangeVtF"></a>
                    <a name="//apple_ref/swift/Method/removeAttribute(_:at:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:6Proton12RendererViewC15removeAttribute_2atySo21NSAttributedStringKeya_So8_NSRangeVtF">removeAttribute(_:<wbr>at:<wbr>)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Removes the attribute from given range. If the attribute does not exist in the range, it is a no-op.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">removeAttribute</span><span class="p">(</span><span class="n">_</span> <span class="nv">name</span><span class="p">:</span> <span class="kt">NSAttributedString</span><span class="o">.</span><span class="kt">Key</span><span class="p">,</span> <span class="n">at</span> <span class="nv">range</span><span class="p">:</span> <span class="kt">NSRange</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>name</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Key of attribute to be removed.</p>
                                </div>
                              </td>
                            </tr>
                            <tr>
                              <td>
                                <code>
                                <em>range</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>Range from which attribute should be removed.</p>
                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2022 <a class="link" href="" target="_blank" rel="external noopener">Rajdeep</a>. All rights reserved. (Last updated: 2022-05-22)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external noopener">jazzy ♪♫ v0.14.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external noopener">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</html>
